

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/images/head.jpg">
  <link rel="icon" type="image/png" href="/images/head.jpg">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="1|2|3|4|5">
  <meta name="author" content="盖世神论">
  <meta name="keywords" content="">
  <title>Arch Linux - My Blog</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.1.2/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />
  



<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"gaishishenlun.github.io","root":"/","version":"1.8.5","typing":{"enable":true,"typeSpeed":64,"cursorChar":"_","loop":false},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"copy_btn":true,"image_zoom":{"enable":true},"lazyload":{"enable":true,"onlypost":false},"web_analytics":{"enable":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null}}};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/">&nbsp;<strong>盖世神伦</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archive/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/links/">
                <i class="iconfont icon-link-fill"></i>
                友链
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/books/">
                <i class="iconfont icon-books"></i>
                书签
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="Arch Linux">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2020-11-11 11:11" pubdate>
        2020-11-11 11:11:11
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      2.1k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      28
       分钟
    </span>
  

  
  
    
      <!-- 不蒜子统计文章PV -->
      <span id="busuanzi_container_page_pv" style="display: none">
        <i class="iconfont icon-eye" aria-hidden="true"></i>
        <span id="busuanzi_value_page_pv"></span> 次
      </span>
    
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Arch Linux</h1>
            
            <div class="markdown-body">
              <h1 id="Arch-Linux-全家桶"><a href="#Arch-Linux-全家桶" class="headerlink" title="Arch Linux 全家桶"></a>Arch Linux 全家桶</h1><p><strong>前言</strong>：强烈建议观看 Arch Wiki 进行安装配置</p>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><h3 id="0x00安装前准备阶段"><a href="#0x00安装前准备阶段" class="headerlink" title="0x00安装前准备阶段"></a>0x00安装前准备阶段</h3><h4 id="1、到各大镜像站下载Arch-Linux最新镜像文件以及-sig文件并验证"><a href="#1、到各大镜像站下载Arch-Linux最新镜像文件以及-sig文件并验证" class="headerlink" title="1、到各大镜像站下载Arch Linux最新镜像文件以及.sig文件并验证"></a>1、到各大镜像站下载Arch Linux最新镜像文件以及.sig文件并验证</h4><pre><code class="hljs bash">$ md5sum archlinux-2021.01.01-x86_64.iso
48d67c59afcd2e39f25799efcc2b1999  archlinux-2021.01.01-x86_64.iso

$ sha1sum archlinux-2021.01.01-x86_64.iso
c3082b13d3cf0a253e1322568f2fd07479f86d52  archlinux-2021.01.01-x86_64.iso

<span class="hljs-comment"># 在Arch Linux上验证签名</span>
$ pacman-key -v archlinux-version-x86_64.iso.sig

<span class="hljs-comment"># 在其他Linux上验证签名</span>
$ gpg --keyserver pgp.mit.edu --keyserver-options auto-key-retrieve --verify archlinux-2021.01.01-x86_64.iso.sig</code></pre>

<p>此处验证可以忽略，若下载采用HTTP协议则尽量验证一下</p>
<h4 id="2、刻录镜像"><a href="#2、刻录镜像" class="headerlink" title="2、刻录镜像"></a>2、刻录镜像</h4><h5 id="Windows：软件刻录"><a href="#Windows：软件刻录" class="headerlink" title="Windows：软件刻录"></a>Windows：软件刻录</h5><p>rufus、UltraISO软碟通</p>
<h5 id="Linux：DD"><a href="#Linux：DD" class="headerlink" title="Linux：DD"></a>Linux：DD</h5><pre><code class="hljs bash">$ sudo fdisk -l	<span class="hljs-comment">#查看各个磁盘，此处我的U盘为/dev/sdb,其被分成两个分区分别是/dev/sdb1、/dev/sdb2</span></code></pre>

<p><img src="./U_disk.png" srcset="/img/loading.gif" alt="U_disk"></p>
<pre><code class="hljs bash"><span class="hljs-comment"># 需要全部umount</span>
$ sudo umount /dev/sdb1 /dev/sdb2

<span class="hljs-comment"># 然后使用dd命令将镜像写入到U盘所在的分区，其中&quot;/tmp/archlinux-2021.01.01-x86_64.iso&quot;为镜像所在位置</span>
sudo dd <span class="hljs-keyword">if</span>=/tmp/archlinux-2021.01.01-x86_64.iso of=/dev/sdb bs=4M

<span class="hljs-comment"># 另开一个终端查看进度</span>
$ ps aux | grep dd | grep -v <span class="hljs-string">&quot;grep&quot;</span>

<span class="hljs-comment"># 刻录结束后运行sync命令检查，sync结束后就可以拔出U盘了</span>
$ sync</code></pre>

<h3 id="0x01-开始安装-安装过程中皆为root权限"><a href="#0x01-开始安装-安装过程中皆为root权限" class="headerlink" title="0x01 开始安装(安装过程中皆为root权限)"></a>0x01 开始安装(安装过程中皆为root权限)</h3><h4 id="1、联网"><a href="#1、联网" class="headerlink" title="1、联网"></a>1、联网</h4><pre><code class="hljs bash"><span class="hljs-comment">#检查网络接口</span>
$ ip link	

<span class="hljs-comment"># 对于有线以太网，使用dhcpcd获取IP</span>
$ dhcpcd

<span class="hljs-comment"># 对于wifi网络使用iwctl连网，不会用就百度</span>
$ iwctl</code></pre>

<ul>
<li>都不行的话就用手机USB网络共享，手机连Wifi也可以</li>
</ul>
<h4 id="2、验证启动方式"><a href="#2、验证启动方式" class="headerlink" title="2、验证启动方式"></a>2、验证启动方式</h4><pre><code class="hljs bash">$ ls /sys/firmware/efi/efivars</code></pre>

<ul>
<li>如果命令没有错误地显示了目录，则系统以 UEFI 模式启动。如果目录不存在，系统可能以 BIOS 模式或 CSM 模式启动。</li>
</ul>
<h4 id="3、更新系统时间"><a href="#3、更新系统时间" class="headerlink" title="3、更新系统时间"></a>3、更新系统时间</h4><pre><code class="hljs bash">$ timedatectl set-ntp <span class="hljs-literal">true</span></code></pre>

<h4 id="4、建立硬盘分区"><a href="#4、建立硬盘分区" class="headerlink" title="4、建立硬盘分区"></a>4、建立硬盘分区</h4><pre><code class="hljs bash">$ fdisk -l	<span class="hljs-comment">#查看系统分区，例如：/dev/sda、/dev/nvme0n1等。</span>
$ fdisk /dev/nvme0n1	<span class="hljs-comment">#对分区进行操作，此时命令行变为&quot;Command (m for help):&quot;开头，输入m或help即可获取帮助文档</span></code></pre>

<p><strong>能用到的操作:</strong>        n：新建    w：写入    q：退出</p>
<ul>
<li><p>根据需求进行分区，UEFI 与 GPT类型分区表 (BIOS 与 MBR分区表无需EFI分区) 如下：</p>
<table>
<thead>
<tr>
<th align="center">挂载点</th>
<th align="center">分区</th>
<th align="center">分区类型</th>
<th align="center">建议大小</th>
</tr>
</thead>
<tbody><tr>
<td align="center">/mnt/boot/efi</td>
<td align="center">/dev/efi_system_partition（efi 系统分区）</td>
<td align="center">EFI系统分区</td>
<td align="center">512MB</td>
</tr>
<tr>
<td align="center">[SWAP]</td>
<td align="center">/dev/swap_partition（交换空间分区）</td>
<td align="center">SWAP交换空间</td>
<td align="center">[内存] * 1.1</td>
</tr>
<tr>
<td align="center">/mnt</td>
<td align="center">/dev/root_partition（根分区）</td>
<td align="center">Linux x86-64 根目录 (/)</td>
<td align="center">剩余空间</td>
</tr>
</tbody></table>
</li>
</ul>
<pre><code class="hljs bash">$ fdisk -l	<span class="hljs-comment"># 分区后再使用此命令查看分区如下所示</span>

Device          Boot    Start    End    Sectors    Size    Id    Type
/dev/nvme0n1p1  ----    ----     ---    -------    512M    --    ----
/dev/nvme0n1p2  ----    ----     ---    -------    8.8G    --    ----
/dev/nvme0n1p3  ----    ----     ---    -------    460G    --    ----</code></pre>

<h4 id="5、格式化分区"><a href="#5、格式化分区" class="headerlink" title="5、格式化分区"></a>5、格式化分区</h4><pre><code class="hljs bash">$ mkfs.ext4 /dev/nvme0n1p3		<span class="hljs-comment">#根分区</span>
$ mkfs.fat -F32 /dev/nvme0n1p1	<span class="hljs-comment">#EFI分区</span>
$ mkswap /dev/nvme0n1p2			<span class="hljs-comment">#交换分区</span></code></pre>

<p>如果在格式化EFI分区时提示：”WARNING: Not enough clusters for a 32 bit FAT!”，请运行</p>
<pre><code class="hljs bash">$ mkfs.fat -s2 -F32	/dev/nvme0n1p1	<span class="hljs-comment">#或 -s1 以减小簇大小，否则 UEFI 无法读取分区。</span></code></pre>

<p>运行 mkfs.fat -s2 -F32 … 或 -s1 以减小簇大小，否则 UEFI 无法读取分区。</p>
<h4 id="6、挂载分区"><a href="#6、挂载分区" class="headerlink" title="6、挂载分区"></a>6、挂载分区</h4><pre><code class="hljs bash">$ mount /dev/nvme0n1p3 /mnt				<span class="hljs-comment">#先挂载根分区</span>
$ mkdir -p /mnt/boot/efi				<span class="hljs-comment">#创建EFI分区所在文件夹</span>
$ mount /dev/nvme0n1p1 /mnt/boot/efi	<span class="hljs-comment">#挂载EFI分区</span>
$ swapon /dev/nvme0n1p2					<span class="hljs-comment">#开启SWAP分区</span></code></pre>

<h4 id="7、安装基本系统"><a href="#7、安装基本系统" class="headerlink" title="7、安装基本系统"></a>7、安装基本系统</h4><ul>
<li>更换镜像站为国内镜像站</li>
</ul>
<pre><code class="hljs bash">$ vim /etc/pacman.d/mirrorlist	<span class="hljs-comment">#找到国内镜像站</span></code></pre>

<p><img src="./mirrors.png" srcset="/img/loading.gif" alt="mirrors"></p>
<p>挑选自己喜欢的镜像站复制到文件首部 (也可以全部移到首部)。</p>
<ul>
<li>安装基本软件</li>
</ul>
<pre><code class="hljs bash">$ pacstrap /mnt base linux linux-firmware</code></pre>

<h4 id="8、配置系统"><a href="#8、配置系统" class="headerlink" title="8、配置系统"></a>8、配置系统</h4><pre><code class="hljs bash">$ genfstab -U /mnt &gt;&gt; /mnt/etc/fstab	<span class="hljs-comment">#生成fstab文件</span>
$ cat /mnt/etc/fstab	<span class="hljs-comment">#检查文件</span>

$ arch-chroot /mnt		<span class="hljs-comment">#Change root到新安装的系统中</span></code></pre>

<ul>
<li>以上为U盘中的live系统，以下为安装到电脑中的系统</li>
</ul>
<h5 id="时区"><a href="#时区" class="headerlink" title="时区"></a>时区</h5><pre><code class="hljs bash">$ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime	<span class="hljs-comment">#设置时区</span></code></pre>

<h5 id="本地化"><a href="#本地化" class="headerlink" title="本地化"></a>本地化</h5><p>编辑 <code>/etc/locale.gen</code> 文件移除需要地区前的注释符号，例：en_US.UTF-8、zh_CN.UTF-8、zh_TW.UTF-8 UTF-8</p>
<pre><code class="hljs bash">$ locale-gen	<span class="hljs-comment">#生成locale信息</span>

<span class="hljs-comment">#将默认语言编码写入locale.conf文件,也可以使用en_GB.UTF-8 或 en_SG.UTF-8</span>
$ <span class="hljs-built_in">echo</span> LANG=en_US.UTF-8 &gt; /etc/locale.conf</code></pre>

<h5 id="网络配置"><a href="#网络配置" class="headerlink" title="网络配置"></a>网络配置</h5><pre><code class="hljs bash">$ <span class="hljs-built_in">echo</span> gaishishenlun &gt; /etc/hostname	<span class="hljs-comment"># 创建 /etc/hostname 写入主机名 gaishishenlun</span>

<span class="hljs-comment"># 添加到hosts</span>
$ vim /etc/hosts	<span class="hljs-comment"># 注意gaishishenlun改成自己的主机名，若有系统有永久IP，则将127.0.1.1换之。</span>
------------------------------------------------------
127.0.0.1	localhost
::1		localhost
127.0.1.1	gaishishenlun.localdomain	gaishishenlun</code></pre>

<h5 id="基本设置"><a href="#基本设置" class="headerlink" title="基本设置"></a>基本设置</h5><pre><code class="hljs bash">$ pacman -S fish	<span class="hljs-comment"># 安装一个喜欢的shell，zsh 或 fish都可以</span>

$ passwd	<span class="hljs-comment"># 修改root密码</span>

$ useradd -m -G wheel -s /usr/bin/fish gaishsihenlun	<span class="hljs-comment"># 创建一个用户</span>
<span class="hljs-comment"># -m 创建用户主目录、-G添加附加用户组，wheel为管理员组、-s选择默认shell、gaishishenlun为用户名</span>
$ passwd gaishishenlun	<span class="hljs-comment"># 修改gaishishenlun用户的密码</span>

$ pacman -S iw wpa_supplicant dialog netctl dhcpcd	<span class="hljs-comment"># 网络所需软件</span>

$ pacman -S sudo	<span class="hljs-comment"># 安装权限管理软件sudo，安装后修改/etc/sudoers，去掉82行以及88行的注释</span></code></pre>

<p><img src="./sudo.png" srcset="/img/loading.gif" alt="sudo"></p>
<h5 id="安装引导程序（GRUB）"><a href="#安装引导程序（GRUB）" class="headerlink" title="安装引导程序（GRUB）"></a>安装引导程序（GRUB）</h5><p><strong>根据引导类型选择<u>一个</u>进行安装</strong></p>
<ul>
<li>UEFI引导：</li>
</ul>
<pre><code class="hljs bash">$ pacman -S grub efibootmgr	<span class="hljs-comment"># 安装所需软件</span>

$ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB	<span class="hljs-comment"># 安装引导</span>

$ grub-mkconfig -o /boot/grub/grub.cfg	<span class="hljs-comment"># 生成cfg文件</span></code></pre>

<ul>
<li>MBR引导</li>
</ul>
<pre><code class="hljs bash">$ pacman -S grub	<span class="hljs-comment"># 安装所需软件</span>

$ grub-install --target=i386-pc /dev/nvme0n1	<span class="hljs-comment">#nvme0n1为磁盘，而不是某个分区</span>

$ grub-mkconfig -o /boot/grub/grub.cfg	<span class="hljs-comment"># 生成cfg文件</span></code></pre>



<ul>
<li><strong>上述安装过程中无错误出现即为安装成功，否则必须重新安装。</strong></li>
</ul>
<h3 id="0x02-重启、结束安装"><a href="#0x02-重启、结束安装" class="headerlink" title="0x02 重启、结束安装"></a>0x02 重启、结束安装</h3><pre><code class="hljs bash">$ <span class="hljs-built_in">exit</span>	<span class="hljs-comment"># 退出chroot环境</span>

$ umount /mnt	<span class="hljs-comment"># 卸载所有挂载的分区</span>

$ reboot	<span class="hljs-comment">#重启计算机，关机后移除安装介质（U盘）</span></code></pre>

<p><strong>至此，Arch Linux 安装成功</strong></p>
<h2 id="系统配置"><a href="#系统配置" class="headerlink" title="系统配置"></a>系统配置</h2><h3 id="0x00-基本软件"><a href="#0x00-基本软件" class="headerlink" title="0x00 基本软件"></a>0x00 基本软件</h3><pre><code class="hljs bash">$ sudo pacman -S neovim pkg-config xterm fakeroot binutils curl wget git yay make cmake clang nodejs npm goland ruby maven gcc jdk8-openjdk neofetch unrar unzip p7zip zsh tmux openssh gimp firefox chromium</code></pre>



<h3 id="0x00-X-窗口管理系统"><a href="#0x00-X-窗口管理系统" class="headerlink" title="0x00 X 窗口管理系统"></a>0x00 X 窗口管理系统</h3><pre><code class="hljs bash">$ sudo pacman -S xorg xorg-xinit	<span class="hljs-comment"># xorg为X服务基本服务以及一些软件、xorg-xinit为手动启动桌面软件</span></code></pre>



<h3 id="0x01-桌面环境"><a href="#0x01-桌面环境" class="headerlink" title="0x01 桌面环境"></a>0x01 桌面环境</h3><h4 id="1-dwm窗口管理器"><a href="#1-dwm窗口管理器" class="headerlink" title="-1- dwm窗口管理器"></a>-1- dwm窗口管理器</h4><h4 id="1、克隆源代码"><a href="#1、克隆源代码" class="headerlink" title="1、克隆源代码"></a>1、克隆源代码</h4><pre><code class="hljs bash"><span class="hljs-comment"># 建议事先创建好文件夹、方便管理文件</span>
$ git <span class="hljs-built_in">clone</span> https://git.suckless.org/dwm	<span class="hljs-comment"># 极简主义窗口管理器</span>
$ git <span class="hljs-built_in">clone</span> https://git.suckless.org/dmenu	<span class="hljs-comment"># 一个软件启动菜单</span>
$ git <span class="hljs-built_in">clone</span> https://git.suckless.org/st		<span class="hljs-comment"># 简单的终端</span></code></pre>

<h4 id="2、构建"><a href="#2、构建" class="headerlink" title="2、构建"></a>2、构建</h4><pre><code class="hljs bash">$ <span class="hljs-built_in">cd</span> dmenu/					<span class="hljs-comment"># 进入dmenu目录</span>
$ sudo make	clean install	<span class="hljs-comment"># 这里先构建dmenu(无需配置)，等下dwm要用得到，不然会很尴尬</span>
$ <span class="hljs-built_in">cd</span> st/					<span class="hljs-comment"># 进入st目录</span>
$ sudo make	clean install	<span class="hljs-comment"># dwm默认终端为st，先构建暂不配置，使用官方配置</span>
$ <span class="hljs-built_in">cd</span> dwm/					<span class="hljs-comment"># 进入dwm目录</span>
$ sudo make	clean install	<span class="hljs-comment"># 构建dwm(官方配置)</span></code></pre>

<p>修改<code>/etc/X11/Xinit/xinitrc</code>在最后一行加入<code>exec dwm</code>，注意前一行尾部要有&amp;.</p>
<p>然后在tty界面输入startx启动.</p>
<h4 id="3、dwm的一些默认设置"><a href="#3、dwm的一些默认设置" class="headerlink" title="3、dwm的一些默认设置"></a>3、dwm的一些默认设置</h4><p>dwm默认的 <strong>MODKEY</strong> 为 <strong>Alt</strong> 键。</p>
<p>Alt + Shitf + Return(回车)    打开终端 (默认为st)</p>
<p>Alt + P                                     打开启动菜单</p>
<p>Alt + Shitf + q                        关闭dwm (也可以在命令行输入<code>killall dwm</code>)</p>
<h4 id="4、个性化配置dwm"><a href="#4、个性化配置dwm" class="headerlink" title="4、个性化配置dwm"></a>4、个性化配置dwm</h4><h3 id="0x02-美化"><a href="#0x02-美化" class="headerlink" title="0x02 美化"></a>0x02 美化</h3><pre><code class="hljs bash">$ sudo pacman -S feh picom xfce4-power-manager alsa-utils
<span class="hljs-comment"># feh为壁纸软件、picom可以透明窗口拥有毛玻璃特效、alsa-utils为声音组件</span></code></pre>

<h4 id="2、polybar"><a href="#2、polybar" class="headerlink" title="2、polybar"></a>2、polybar</h4><pre><code class="hljs bash">$ yay -S polybar	<span class="hljs-comment"># 代替dwm的状态显示器，依赖尽量都安装了</span>
$ sudo pacman -S libmpdclient mpd	<span class="hljs-comment"># 要使用mpd模块，需要安装这两个</span></code></pre>



<h4 id="2-kde"><a href="#2-kde" class="headerlink" title="-2- kde"></a>-2- kde</h4><ul>
<li>plasma-desktop</li>
<li>plasma</li>
<li>konsole    # 终端</li>
<li>latte-dock    # 下方的dock</li>
</ul>
<pre><code class="hljs bash">$ sudo pacman -S plasma plasma-desktop konsole latte-dock</code></pre>







<h3 id="字体"><a href="#字体" class="headerlink" title="字体"></a>字体</h3><pre><code class="hljs bash">$ sudo pacman-S adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts nerd-fonts-code-new-roman ttf-wps-fonts</code></pre>

<ul>
<li>输入法</li>
</ul>
<pre><code class="hljs bash">$ sudo pacman -S fcitx5</code></pre>



<h2 id="常用"><a href="#常用" class="headerlink" title="常用"></a>常用</h2><ul>
<li>netease-cloud-music    #网易云</li>
<li>mplayer    #轻量视频播放器</li>
<li>vlc     # 视频播放器</li>
<li>telegram    # 社交</li>
<li>yakuake    # 下拉式终端</li>
<li>obs    # 录屏直播</li>
<li>wps    # office</li>
<li>pencil    # 画画</li>
<li>ranger    # 终端文件管理器</li>
<li>feh    # 图片查看器</li>
<li>Dolphin    # kde文件管理器</li>
<li>v2ray qv2ray    # 网络加速</li>
<li>kdenlive    # 视频剪辑</li>
</ul>
<pre><code class="hljs ebnf"><span class="hljs-attribute">sudo pacman -S netease-cloud-music mplayer vlc telegram-desktop yakuake obs-studio wps pencil ranger feh dolphin kdenlive</span></code></pre>



<h2 id="开发环境"><a href="#开发环境" class="headerlink" title="开发环境"></a>开发环境</h2><ul>
<li>vscode    # 经典代码编辑器</li>
</ul>
<pre><code class="hljs bash">sudo pacman -S visual-studio-code-bin</code></pre>







<h2 id="CTF-Tools"><a href="#CTF-Tools" class="headerlink" title="CTF Tools"></a>CTF Tools</h2><h3 id="web"><a href="#web" class="headerlink" title="web"></a>web</h3><ul>
<li>nmap    # 网络扫描</li>
<li>sqlmap    # sql注入</li>
<li>zaproxy    # yyds</li>
</ul>
<pre><code class="hljs bash">$ sudo pacman -S nmap sqlmap zaproxy</code></pre>



<h3 id="pwn"><a href="#pwn" class="headerlink" title="pwn"></a>pwn</h3><ul>
<li>IDA Pro    # 静态分析</li>
</ul>
<p>需要Wine环境</p>
<ul>
<li>Pwntools    # pwn选手专用库<ul>
<li>checksec</li>
<li>ROPgadget</li>
</ul>
</li>
<li>pwndbg    # 动态调试</li>
</ul>
<p>添加 <code>source /usr/share/pwndbg/gdbinit.py</code> 到 <code>~/.gdbinit</code></p>
<ul>
<li>one_gadget    # 一键从libc中找到可以getshell的地址，ruby环境</li>
<li>main_arena_offset    # 取自github</li>
</ul>
<pre><code class="hljs bash">$ yay -S pwndbg
$ pip install pwntools
$ gem install one_gadget</code></pre>



<h2 id="Sec-Tools"><a href="#Sec-Tools" class="headerlink" title="Sec Tools"></a>Sec Tools</h2><ul>
<li>lynis    # 系统扫描工具</li>
<li>ettercap    # arp攻击</li>
<li>wireshark    # 流量分析</li>
<li>aircrack-ng    # wifi攻击套件</li>
<li>metasploit    # msf框架</li>
<li>maltego    # 社工框架</li>
<li>chntpw    # 密码破解工具</li>
</ul>
<pre><code class="hljs bash">$ sudo pacman -S lynis ettercap wireshark aircrack-ng metasploit chntpw
$ yay -S maltego</code></pre>


            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/categories/Linux/">Linux</a>
                    
                      <a class="hover-with-bg" href="/categories/Linux/%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE/">安装配置</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/Linux/">Linux</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2020/11/20/Git%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">Git常用命令</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2020/09/19/Metasploit/">
                        <span class="hidden-mobile">Metasploit</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>盖世神伦</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Blog</span></a> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  

</footer>
<!-- SCRIPTS -->

  <script  src="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":200})
    NProgress.start()
    document.addEventListener('DOMContentLoaded', function() {
      window.NProgress && window.NProgress.inc();
    })
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.5.3/js/bootstrap.min.js" ></script>
<script  src="/js/debouncer.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  
    <script  src="/js/lazyload.js" ></script>
  



  



  <script  src="https://cdn.staticfile.org/tocbot/4.12.0/tocbot.min.js" ></script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>



  <script  src="https://cdn.staticfile.org/anchor-js/4.3.0/anchor.min.js" ></script>



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>



  <script  src="/js/local-search.js" ></script>
  <script>
    (function () {
      var path = "/local-search.xml";
      var inputArea = document.querySelector("#local-search-input");
      inputArea.onclick = function () {
        searchFunc(path, 'local-search-input', 'local-search-result');
        this.onclick = null
      }
    })()
  </script>












  

  

  

  

  

  





<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>




  <script src='https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js'></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize({theme: 'forest'});
    }
  </script>



</body>
</html>
